<template>
  <div class="base-info-view">
    <el-form
      class="form-detail"
      label-position="right"
      label-width="120px"
    >
      <el-row
        :gutter="20"
        style="width:100%"
      >
        <el-col :span="8">
          <el-form-item
            label="流程编号："
            style="width: 100%;"
          >
            <span>{{ detailData.processNo }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item
            label="创建时间："
            style="width: 100%;"
          >
            {{ dateFormat('yyyy-mm-dd HH:MM', detailData.startTime) }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item
            label="创建人："
            style="width: 100%;"
          >
            <span>{{ detailData.initiator }}</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <item-title title="汇款信息信息" />
    <el-form
      class="form-detail"
      label-position="right"
      label-width="120px"
      style="padding-left:20px;"
    >
      <el-row
        :gutter="20"
        style="width:100%"
      >
        <el-col :span="8">
          <el-form-item label="回款金额：">
            <div>{{ detail.distributeServeNo }}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="回款类型：">
            <div>{{ detail.distributeServeNo }}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="配送商名称：">
            <div>{{ detail.distributeName }}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="到款日期：">
            <div>{{ dateFormat('yyyy-mm-dd HH:MM', detail.expireTime) }}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="付款开户行：">
            <div>{{ detail.distributeName }}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="付款银行账号：">
            <div>{{ detail.remark }}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="回款客户名称：">
            <div>{{ detail.remark }}</div>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import {reactive, toRefs, watch} from 'vue'

export default {
  name: 'DistributorServiceInfo',
  components: {},
  props: {
    detailData: {
      type: Object,
      default: () => {},
    },
  },
  setup(props, context) {
    var reactiveData = reactive({
      detail: props.detailData,
      detailData: {},
    })
    watch(
      () => props.detailData,
      (newval, oldval) => {
        if (newval) {
          reactiveData.detailData = newval
          reactiveData.data = newval.data
        }
      },
      { immediate: true, deep: true }
    )
    return {
      ...toRefs(props),
      ...toRefs(reactiveData),
    }
  },
}
</script>

<style scoped>
</style>
